<?php
use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', 'IndexController@index');
Route::post('/dologin', 'IndexController@dologin');//登陆
//图片上传接口
Route::post('/upload_images','IndexController@upload_images');//上传文件
Route::post('/upload_mp4_pdf','IndexController@upload_mp4_pdf');//上传文件

//生成二维码
Route::get('/qrcode', 'QrcodeController@index');

Route::middleware(['login'])->group(function(){
    //管理员管理
    Route::post('/AccountAdd', 'AccountController@add');//添加管理员
	Route::get('/Account', 'AccountController@list');//管理员列表
	Route::get('/AccountDel/{id}', 'AccountController@del');//管理员删除
	Route::post('/AccountUpdate', 'AccountController@update');//管理员修改
	Route::get('/AccountInfo/{id}', 'AccountController@info');//管理员详情
    //添加文章
    Route::post('/ArticleAdd', 'ArticleController@add');//添加文章
	Route::get('/ArticleList', 'ArticleController@list');//文章列表
	Route::get('/ArticleDel/{id}', 'ArticleController@del');//文章删除
	Route::post('/ArticleUpdate', 'ArticleController@update');//修改
	Route::get('/ArticleInfo/{id}', 'ArticleController@info');//详情
    //分类管理
    Route::post('/CategoryAdd', 'CategoryController@add');//分类添加
	Route::post('/CategoryUpdate', 'CategoryController@update');//分类修改
	Route::get('/CategoryList', 'CategoryController@list');//分类列表
	Route::get('/CategoryDel/{id}', 'CategoryController@del');//分类删除
	Route::get('/CategoryInfo/{id}', 'CategoryController@info');//分类详情
    //轮播图管理
	Route::post('/BannerAdd', 'BannerController@add');//轮播图添加
	Route::post('/BannerUpdate', 'BannerController@update');//轮播图修改
	Route::get('/BannerList', 'BannerController@list');//轮播图列表
	Route::get('/BannerDel/{id}', 'BannerController@del');//轮播图删除
	Route::get('/BannerInfo/{id}', 'BannerController@info');//轮播图详情
    //轮播图管理
	Route::post('/CaseAdd', 'Case_anliController@add');//轮播图添加
	Route::post('/CaseUpdate', 'Case_anliController@update');//轮播图修改
	Route::get('/CaseList', 'Case_anliController@list');//轮播图列表
	Route::get('/CaseDel/{id}', 'Case_anliController@del');//轮播图删除
	Route::get('/CaseInfo/{id}', 'Case_anliController@info');//轮播图详情
	//消息
	Route::get('/MsgDel/{id}', 'MsgController@del');
	Route::get('/MsgList/{id}', 'MsgController@list');

	// //修改seo配置
	// Route::post('/SettingUpdate','SettingController@update');
	// Route::post('/SettingList','SettingController@list');

	//课程管理
	Route::post('/CourseAdd', 'CourseController@add');//课程添加
	Route::post('/CourseUpdate', 'CourseController@update');//课程修改
	Route::get('/CourseList', 'CourseController@list');//课程列表
	Route::get('/CourseDel/{id}', 'CourseController@del');//课程删除
	Route::get('/CourseInfo/{id}', 'CourseController@info');//课程详情
	//单位管理
	Route::post('/CompanyAdd', 'CompanyController@add');//课程添加
	Route::post('/CompanyUpdate', 'CompanyController@update');//课程修改
	Route::get('/CompanyList', 'CompanyController@list');//课程列表
	Route::get('/CompanyDel/{id}', 'CompanyController@del');//课程删除
	Route::get('/CompanyInfo/{id}', 'CompanyController@info');//课程详情
	//品牌管理
	Route::post('/ManualBrandAdd', 'ManualBrandController@add');//
	Route::post('/ManualBrandUpdate', 'ManualBrandController@update');
	Route::get('/ManualBrandList', 'ManualBrandController@list');
	Route::get('/ManualBrandDel/{id}', 'ManualBrandController@del');
	Route::get('/ManualBrandInfo/{id}', 'ManualBrandController@info');
	//手册管理
	Route::post('/ManualAdd', 'ManualController@add');//课程添加
	Route::post('/ManualUpdate', 'ManualController@update');//课程修改
	Route::get('/ManualList', 'ManualController@list');//课程列表
	Route::get('/ManualDel/{id}', 'ManualController@del');//课程删除
	Route::get('/ManualInfo/{id}', 'ManualController@info');//课程详情

	//用户管理
	Route::get('/UserList', 'UserController@list');//用户列表
	Route::post('/UserShenhe', 'UserController@shenhe');//用户审核
	Route::post('/UserAdd', 'UserController@add');//课程添加
	Route::post('/UserUpdate', 'UserController@update');//课程修改
	Route::get('/UserDel/{id}', 'UserController@del');//课程删除
	//问题管理题库管理
	Route::post('/QuestionAdd', 'QuestionController@add');//课程添加
	Route::post('/QuestionUpdate', 'QuestionController@update');//课程修改
	Route::get('/QuestionList', 'QuestionController@list');//课程列表
	Route::get('/QuestionDel/{id}', 'QuestionController@del');//课程删除
	Route::get('/QuestionInfo/{id}', 'QuestionController@info');//课程详情
});
